<?php
    /**
      * Mailer form
      * @package M2 Micro Framework
      * @subpackage Template
      * @author Alexander Chaika
      */
?>
<script type="text/javascript">
    $(document).ready(function(){
        $('#add').click(function() {
            $('#source .item:first').clone().append('#mailerForm #source');
        });
    });
</script>
<form id="mailerForm">
    <div id="source">
        <div class="item">
            <fieldset>
                <p>
                    <label for="title"><?php echo translate('Title'); ?></label>
                    <input type="text" name="title[]" value="" />
                </p>
                <p>
                    <label for="description"><?php echo translate('Description'); ?></label>
                    <textarea name="description[]"></textarea>
                </p>
                <p>
                    <label for="file"><?php echo translate('File'); ?></label>
                    <input type="file" name="file[]" value="" />
                </p>
                <p>
                    <label for="link"><?php echo translate('Link'); ?></label>
                    <input type="text" name="link[]" value="" />
                </p>
            </fieldset>
        </div>
    </div>
    <div class="submit">
        <input type="button" name="add" id="add" value="<?php echo translate('Add article'); ?>" />
        <input type="button" name="preview" id="preview" value="<?php echo translate('Preview'); ?>" />
        <input type="button" name="save" id="save" value="<?php echo translate('Save'); ?>" />
    </div>
</form>